package com.moshang.blog.service;

import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.extension.service.IService;
import com.moshang.blog.entity.SysMenu;
import com.moshang.blog.entity.vo.ShowMenu;

import java.util.List;
import java.util.Map;


/**
 * 
 *
 * @author moshang
 * @email 597575122@qq.com
 * @date 2018-09-21 14:45:09
 */
public interface SysMenuService extends IService<SysMenu> {

    List<SysMenu> getResourcesByUserId(Integer id);

    JSONArray getSysMenuByUserId(List<SysMenu> resourcesEntityList);

    List<ShowMenu> getShowMenuByUserId(Integer userId);

    List<SysMenu> selectAllMenus(Map<String, Object> map);

    int getCountByName(String name);

    int getCountByPermission(String permission);

    void saveOrUpdateMenu(SysMenu menu);

    JSONArray getTreeUtil(Long id);
}

